Conventionally, a compressor has a closed container, a compression element placed in the closed container, and a motor placed in the closed container to drive the compression element via a shaft. A stator of the motor is welded to the closed container at a vertically central portion of the stator (see JP 2003-262192 A).